]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
statusArea: hide power indicator on desktop
authorTim Lunn <tim@feathertop.org>
Sat, 1 Sep 2012 02:21:34 +0000 (12:21 +1000)
committerAdel Gadllah <adel.gadllah@gmail.com>
Sat, 1 Sep 2012 07:41:24 +0000 (09:41 +0200)
On a desktop system the power indicator does not get hidden correctly,
since a blank icon '' is returned instead of null.

https://bugzilla.gnome.org/show_bug.cgi?id=683080

js/ui/status/power.js

index ea765495653360e75cadd9d9898633ee9ae49a07..1669734a23dbe3aab6f9f19f275c052c8af9307a 100644 (file)
@@ -152,11 +152,12 @@ const Indicator = new Lang.Class({
 
     _syncIcon: function() {
         let icon = this._proxy.Icon;
-        let hasIcon = (icon != null);
+        let hasIcon = false;
 
-        if (hasIcon) {
+        if (icon) {
             let gicon = Gio.icon_new_for_string(icon);
             this.setGIcon(gicon);
+            hasIcon = true;
         }
         this.mainIcon.visible = hasIcon;
         this.actor.visible = hasIcon && !this._isLocked;